package com.fcml.pattern.responsibility;

/**
 * @author fcml
 * @date 2018/11/9
 */
public class App {
    public static void main(String[] args) {
        //组装责任链
        AbstractHandler groupLeaderHandler = new GroupLeaderHandler();
        AbstractHandler managerHandler = new ManagerHandler();
        AbstractHandler bigBossHandler = new BigBossHandler();
        groupLeaderHandler.setNextHandler(managerHandler);
        managerHandler.setNextHandler(bigBossHandler);

        //处理请求
        groupLeaderHandler.handler("张三", 5);
    }
}
